package com.test.pojo;

import java.util.ArrayList;
import java.util.List;

public class ExamoptionBeanExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public ExamoptionBeanExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andOptionidIsNull() {
            addCriterion("optionid is null");
            return (Criteria) this;
        }

        public Criteria andOptionidIsNotNull() {
            addCriterion("optionid is not null");
            return (Criteria) this;
        }

        public Criteria andOptionidEqualTo(Long value) {
            addCriterion("optionid =", value, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidNotEqualTo(Long value) {
            addCriterion("optionid <>", value, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidGreaterThan(Long value) {
            addCriterion("optionid >", value, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidGreaterThanOrEqualTo(Long value) {
            addCriterion("optionid >=", value, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidLessThan(Long value) {
            addCriterion("optionid <", value, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidLessThanOrEqualTo(Long value) {
            addCriterion("optionid <=", value, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidIn(List<Long> values) {
            addCriterion("optionid in", values, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidNotIn(List<Long> values) {
            addCriterion("optionid not in", values, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidBetween(Long value1, Long value2) {
            addCriterion("optionid between", value1, value2, "optionid");
            return (Criteria) this;
        }

        public Criteria andOptionidNotBetween(Long value1, Long value2) {
            addCriterion("optionid not between", value1, value2, "optionid");
            return (Criteria) this;
        }

        public Criteria andOnameIsNull() {
            addCriterion("oname is null");
            return (Criteria) this;
        }

        public Criteria andOnameIsNotNull() {
            addCriterion("oname is not null");
            return (Criteria) this;
        }

        public Criteria andOnameEqualTo(String value) {
            addCriterion("oname =", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotEqualTo(String value) {
            addCriterion("oname <>", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameGreaterThan(String value) {
            addCriterion("oname >", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameGreaterThanOrEqualTo(String value) {
            addCriterion("oname >=", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameLessThan(String value) {
            addCriterion("oname <", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameLessThanOrEqualTo(String value) {
            addCriterion("oname <=", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameLike(String value) {
            addCriterion("oname like", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotLike(String value) {
            addCriterion("oname not like", value, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameIn(List<String> values) {
            addCriterion("oname in", values, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotIn(List<String> values) {
            addCriterion("oname not in", values, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameBetween(String value1, String value2) {
            addCriterion("oname between", value1, value2, "oname");
            return (Criteria) this;
        }

        public Criteria andOnameNotBetween(String value1, String value2) {
            addCriterion("oname not between", value1, value2, "oname");
            return (Criteria) this;
        }

        public Criteria andIstrueIsNull() {
            addCriterion("istrue is null");
            return (Criteria) this;
        }

        public Criteria andIstrueIsNotNull() {
            addCriterion("istrue is not null");
            return (Criteria) this;
        }

        public Criteria andIstrueEqualTo(Integer value) {
            addCriterion("istrue =", value, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueNotEqualTo(Integer value) {
            addCriterion("istrue <>", value, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueGreaterThan(Integer value) {
            addCriterion("istrue >", value, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueGreaterThanOrEqualTo(Integer value) {
            addCriterion("istrue >=", value, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueLessThan(Integer value) {
            addCriterion("istrue <", value, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueLessThanOrEqualTo(Integer value) {
            addCriterion("istrue <=", value, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueIn(List<Integer> values) {
            addCriterion("istrue in", values, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueNotIn(List<Integer> values) {
            addCriterion("istrue not in", values, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueBetween(Integer value1, Integer value2) {
            addCriterion("istrue between", value1, value2, "istrue");
            return (Criteria) this;
        }

        public Criteria andIstrueNotBetween(Integer value1, Integer value2) {
            addCriterion("istrue not between", value1, value2, "istrue");
            return (Criteria) this;
        }

        public Criteria andExamidIsNull() {
            addCriterion("examid is null");
            return (Criteria) this;
        }

        public Criteria andExamidIsNotNull() {
            addCriterion("examid is not null");
            return (Criteria) this;
        }

        public Criteria andExamidEqualTo(Long value) {
            addCriterion("examid =", value, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidNotEqualTo(Long value) {
            addCriterion("examid <>", value, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidGreaterThan(Long value) {
            addCriterion("examid >", value, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidGreaterThanOrEqualTo(Long value) {
            addCriterion("examid >=", value, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidLessThan(Long value) {
            addCriterion("examid <", value, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidLessThanOrEqualTo(Long value) {
            addCriterion("examid <=", value, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidIn(List<Long> values) {
            addCriterion("examid in", values, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidNotIn(List<Long> values) {
            addCriterion("examid not in", values, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidBetween(Long value1, Long value2) {
            addCriterion("examid between", value1, value2, "examid");
            return (Criteria) this;
        }

        public Criteria andExamidNotBetween(Long value1, Long value2) {
            addCriterion("examid not between", value1, value2, "examid");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}